Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix popup windows content margins #92647

Merged
merged 1 commit into from
Jun 19, 2024

Conversation

passivestar
Copy link
Contributor

Closes #89718

This does 2 things:

  • Makes AcceptDialog use margins that scale with the editor scale to support HiDPI displays

  • Unifies all of the popup margins in the editor by decreasing the margins of the Project/Editor Settings popups and increasing them for AcceptDialogs, making them meet halfway at the same value

Visual comparison (default theme, 1.5 editor scale):

Before:

before

After:

after

@passivestar passivestar requested review from a team as code owners June 1, 2024 13:59
@AThousandShips AThousandShips added this to the 4.3 milestone Jun 1, 2024
@AThousandShips AThousandShips added the cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release label Jun 1, 2024
@passivestar
Copy link
Contributor Author

@AThousandShips this isn't macos-specific as I originally thought, this is HiDPI-specific. The linked issue just wasn't updated

@passivestar
Copy link
Contributor Author

Increased the margin multiplier to make sure buttons align perfectly vertically when using the default base margin value. It's a bit of a magic number but it's best to change the multiplier for popups instead of the base margin value so that only popups are affected with this change

btn

Tested this with both high and low dpi, both with custom and the default theme

Copy link
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally, it works as expected. This looks a fair bit better to me, nice work 🙂

Default

Before After (this PR)
Before After
Before After (this PR)
Before After

Compact

No change. I think there should be more spacing around dialogs when in compact mode (texts can get dangerously close to the OS' rounded corners cutting them off), but this may need to be handled in its own PR.

Spacious

Before After (this PR)
Before After
Before After (this PR)
Before After

@passivestar
Copy link
Contributor Author

but this may need to be handled in its own PR

Yeah tbh I've been kind of ignoring the existence of compact mode so far because iirc the plan was to first introduce those spacing presets in one PR and then make them look not broken at a later point (which never happened so compact mode now has 0px margins all over the place). By the look of it compact mode will need a big amount of work, so I'm wondering if the spacing presets will need to be re-evaluated to better understand how they fit into future plans, especially for 4.4 in case any UI/theme related changes are planned

CC @coppolaemilio @adamscott

@akien-mga akien-mga merged commit 5c30858 into godotengine:master Jun 19, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

@passivestar passivestar deleted the popup-margins branch June 19, 2024 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release topic:gui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tiny paddings in popup windows
4 participants